package com.yupi.springbootinit.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.springbootinit.model.dto.grinding.GrindingRecordAddRequest;
import com.yupi.springbootinit.model.dto.grinding.GrindingRecordQueryRequest;
import com.yupi.springbootinit.model.dto.grinding.GrindingRecordUpdateRequest;
import com.yupi.springbootinit.model.entity.GrindingRecord;
import com.yupi.springbootinit.model.vo.GrindingRecordVO;

/**
 * 磨床记录服务
 */
public interface GrindingRecordService extends IService<GrindingRecord> {

    /**
     * 添加磨床记录
     *
     * @param addRequest 添加请求
     * @return 记录ID
     */
    Long addRecord(GrindingRecordAddRequest addRequest);

    /**
     * 更新磨床记录
     *
     * @param updateRequest 更新请求
     * @return 是否成功
     */
    Boolean updateRecord(GrindingRecordUpdateRequest updateRequest);

    /**
     * 删除磨床记录
     *
     * @param id 记录ID
     * @return 是否成功
     */
    Boolean deleteRecord(Long id);

    /**
     * 根据ID获取记录详情
     *
     * @param id 记录ID
     * @return 记录详情
     */
    GrindingRecordVO getRecordById(Long id);

    /**
     * 分页查询磨床记录
     *
     * @param queryRequest 查询条件
     * @return 分页结果
     */
    Page<GrindingRecordVO> pageRecords(GrindingRecordQueryRequest queryRequest);
}